//
//  UIDevice.swift
//  vr_web
//
//  Created by 李旭峰 on 2020/7/13.
//

import Foundation

let kScreenHeight = UIScreen.main.bounds.height
let kScreenWidth = UIScreen.main.bounds.width

let customerMobile:String = "400-1919-520"
extension String {
    /// 是否为客服电话
    func isCustomerMobile() -> Bool {
        let sourceMobile = customerMobile.replacingOccurrences(of: "-", with: "")
        var tempMobile = self
        tempMobile = tempMobile.replacingOccurrences(of: "-", with: "")
        tempMobile = tempMobile.replacingOccurrences(of: " ", with: "")
        return tempMobile == sourceMobile
    }
}
//let specialBankCard:BankCardModel = CXCreateSpecialBackCard()
//fileprivate func CXCreateSpecialBackCard() -> BankCardModel {
//    let bankCard = BankCardModel()
//    bankCard.backCardNum = "1202220909100126880"
//    bankCard.bankCardType = "中国工商银行杭州科创支行"
//    bankCard.payee = "杭州牛牛搭整家科技有限公司"
//    return bankCard
//}

let userProtocolUrl_ipv6:String = "https://mv6.asman.com.cn/static/userAgreements.html"
let userProtocolUrl_ipv4:String = "https://m.asman.com.cn/static/userAgreements.html"
let privacyProtocolUrl_ipv6:String = "https://mv6.asman.com.cn/static/privacy.html"
let privacyProtocolUrl_ipv4:String = "https://m.asman.com.cn/static/privacy.html"

/// 性别
enum Gender:Int {
    ///  男性
    case kMan
    /// 女性
    case kWoman
}

struct AppId {
    static let wechat = "wx9b46dbb8b996cade"
    static let umeng = "5cdd21530cafb28cbc0013b2"
    static let asman = "ComAppSchemeAsman"
    
}
struct WechatMini {
    static let appId = "wx0dcab93cea0ee8c1"
    static let sourceId = "gh_ec1a5d83cc0b"
}


extension UIDevice {
    
    public var appVersion: String {
        return Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String
    }
    
    public var appBuild: String {
        return Bundle.main.infoDictionary!["CFBundleVersion"] as! String
    }
    
    public var appBundleID: String {
        return Bundle.main.bundleIdentifier!
    }
}
extension UIDevice {
    @objc func getAppVersion() -> String {
        return self.appVersion;
    }
    
    @objc func getAppBuild() -> String {
        return self.appBuild;
    }
    
    @objc func getBundleID() -> String {
        return self.appVersion;
    }
    @objc func getSafeTop() -> CGFloat {
        return vSafeTop;
    }
}
